package com.czy.owner.entity;

import java.io.Serializable;
import java.util.List;

/**
 * Created by King on 2017-06-05
 */

public class GoodsEntity implements Serializable {
    /**
     * goodsId : 112
     * goodsBrandId : 57
     * goodsBriefCode :
     * description : 飞天牌航天飞机
     * totalCount : 1027
     * delFlag : false
     * remainingCount : 966
     * needService : false
     * carAccId : 0
     * onTime : 0
     * modifyTime : 1487125117012
     * price : 10.0
     * recommendValue : 0
     * unitId : 2
     * goodsSpecValuesPrice : 22.0
     * belongsType : store
     * belongsTypeId : 0
     * goodsName : 飞天牌航天飞机
     * chName : 阿达
     * goodsDetails : null
     * costPrice : 0.0
     * fromGoodsId : 0
     * sort : 1
     * storeId : 285
     * specGroupKey : 2222222
     * createTime : 1480901011169
     * servicePrice : -1.0
     * purchaseOrderId : 0
     * goodsCode : SP1480901011169
     * offTime : 0
     * goodsLogo : http://192.168.8.50:8080/res/download/6830
     * categoryId : 193
     * status : on
     * logisticsTemplateId : 89
     */

    private long goodsId;
    private long goodsBrandId;
    private String goodsBriefCode;
    private String description;
    private int totalCount;
    private String delFlag;
    private int remainingCount;
    private String needService;
    private int carAccId;
    private long onTime;
    private long modifyTime;
    private double price;
    private int recommendValue;
    private int unitId;
    private double goodsSpecValuesPrice;
    private String belongsType;
    private String belongsTypeId;
    private String goodsName;
    private String chName;
    private String goodsDetails;
    private double costPrice;
    private int fromGoodsId;
    private int sort;
    private int storeId;
    private String specGroupKey;
    private long createTime;
    private double servicePrice;
    private int purchaseOrderId;
    private String goodsCode;
    private long offTime;
    private String goodsLogo;
    private int categoryId;
    private String status;
    private int logisticsTemplateId;
    private double toStorePrice;
    //购物车扩展字段
    private int count;//购买数量
    private String logo;//图片地址
    private String goodsSpecId;//规格组id
    private int shoppingCartId;
    private int deliveryWayId;//配送id
    private String goodsSpec;//规格组
    private int serviceInstallStoreId;//安装门店id
    private int collect;//是否需要收藏
    private long goodsSpecValuesId;//商品规格组id
    private String deliveryWayName;//配送方式名称
    //商品详情扩展字段
    private boolean install;//接口获取的商品自带是否需要安装
    private boolean postageFree;//接口获取的是否包邮
    private String installStoreName;//安装门店名
    private boolean needInstall;//个人选择的是否需要安装
    private boolean isEverChooseInstall;//用于判断安装部分控件是否点击过
    private boolean isSecKill;//是否为秒杀
    private boolean haveMemberPriceFlag;//是否有会员价
    private double storeMemberPrice;//会员价


    //  2018.3.30 wangyang新增 商品来源
    private List<ItemFromList> itemFromList;
    private String fromType;
    private String fromTypeId;

    public List<ItemFromList> getItemFromList() {
        return itemFromList;
    }

    public void setItemFromList(List<ItemFromList> itemFromList) {
        this.itemFromList = itemFromList;
    }

    public class ItemFromList implements Serializable{
        private int userOrderId;
        private int itemId;
        private String fromType;
        private long createTime;
        private String fromTypeId;
        private int count;
        private String type;

        public int getUserOrderId() {
            return userOrderId;
        }

        public void setUserOrderId(int userOrderId) {
            this.userOrderId = userOrderId;
        }

        public int getItemId() {
            return itemId;
        }

        public void setItemId(int itemId) {
            this.itemId = itemId;
        }

        public String getFromType() {
            return fromType;
        }

        public void setFromType(String fromType) {
            this.fromType = fromType;
        }

        public long getCreateTime() {
            return createTime;
        }

        public void setCreateTime(long createTime) {
            this.createTime = createTime;
        }

        public String getFromTypeId() {
            return fromTypeId;
        }

        public void setFromTypeId(String fromTypeId) {
            this.fromTypeId = fromTypeId;
        }

        public int getCount() {
            return count;
        }

        public void setCount(int count) {
            this.count = count;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }
    }
    public String getFromTypeId() {
        return fromTypeId;
    }

    public void setFromTypeId(String fromTypeId) {
        this.fromTypeId = fromTypeId;
    }

    public String getFromType() {
        return fromType;
    }

    public void setFromType(String fromType) {
        this.fromType = fromType;
    }

    /**
     * deliveryWay : {"weightIncreasePrice":0,"address":"","cityId":0,"numberDefaultPrice":10,"deliveryWayId":355,"volumeIncrease":1,"provinceId":0,"volumeDefaultPrice":0,"weightDefault":1,"superDeliveryWayId":0,"numberIncrease":1,"areaId":0,"numberIncreasePrice":5,"numberDefault":1,"weightIncrease":1,"name":"快递","volumeDefault":1,"belongsType":"system","volumeIncreasePrice":0,"belongsTypeId":"0","weightDefaultPrice":0}
     */

    private DeliveryWayEntity deliveryWay;
    private InstallStoreBean store;

    public boolean isEverChooseInstall() {
        return isEverChooseInstall;
    }

    public void setEverChooseInstall(boolean everChooseInstall) {
        isEverChooseInstall = everChooseInstall;
    }

    public boolean isHaveMemberPriceFlag() {
        return haveMemberPriceFlag;
    }

    public void setHaveMemberPriceFlag(boolean haveMemberPriceFlag) {
        this.haveMemberPriceFlag = haveMemberPriceFlag;
    }

    public double getStoreMemberPrice() {
        return storeMemberPrice;
    }

    public void setStoreMemberPrice(double storeMemberPrice) {
        this.storeMemberPrice = storeMemberPrice;
    }

    public double getToStorePrice() {
        return toStorePrice;
    }

    public void setToStorePrice(double toStorePrice) {
        this.toStorePrice = toStorePrice;
    }

    public boolean isSecKill() {
        return isSecKill;
    }

    public void setSecKill(boolean secKill) {
        isSecKill = secKill;
    }

    public boolean isNeedInstall() {
        return needInstall;
    }

    public void setNeedInstall(boolean needInstall) {
        this.needInstall = needInstall;
    }


    public String getInstallStoreName() {
        return installStoreName;
    }

    public void setInstallStoreName(String installStoreName) {
        this.installStoreName = installStoreName;
    }

    public boolean isInstall() {
        return install;
    }

    public void setInstall(boolean install) {
        this.install = install;
    }

    public boolean isPostageFree() {
        return postageFree;
    }

    public void setPostageFree(boolean postageFree) {
        this.postageFree = postageFree;
    }

    public int getDeliveryWayId() {
        return deliveryWayId;
    }

    public void setDeliveryWayId(int deliveryWayId) {
        this.deliveryWayId = deliveryWayId;
    }

    public int getServiceInstallStoreId() {
        return serviceInstallStoreId;
    }

    public void setServiceInstallStoreId(int serviceInstallStoreId) {
        this.serviceInstallStoreId = serviceInstallStoreId;
    }

    public int getCount() {
        if (count < 1) {
            count = 1;
        }
        return count;
    }

    public void setCount(int count) {
        if (count < 1) {
            count = 1;
        }
        this.count = count;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getGoodsSpecId() {
        return goodsSpecId;
    }

    public void setGoodsSpecId(String goodsSpecId) {
        this.goodsSpecId = goodsSpecId;
    }

    public int getShoppingCartId() {
        return shoppingCartId;
    }

    public void setShoppingCartId(int shoppingCartId) {
        this.shoppingCartId = shoppingCartId;
    }

    public String getGoodsSpec() {
        return goodsSpec;
    }

    public void setGoodsSpec(String goodsSpec) {
        this.goodsSpec = goodsSpec;
    }

    public int getCollect() {
        return collect;
    }

    public void setCollect(int collect) {
        this.collect = collect;
    }

    public long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(long goodsId) {
        this.goodsId = goodsId;
    }

    public long getGoodsBrandId() {
        return goodsBrandId;
    }

    public void setGoodsBrandId(long goodsBrandId) {
        this.goodsBrandId = goodsBrandId;
    }

    public String getGoodsBriefCode() {
        return goodsBriefCode;
    }

    public void setGoodsBriefCode(String goodsBriefCode) {
        this.goodsBriefCode = goodsBriefCode;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public int getRemainingCount() {
        return remainingCount;
    }

    public void setRemainingCount(int remainingCount) {
        this.remainingCount = remainingCount;
    }

    public String getNeedService() {
        return needService;
    }

    public void setNeedService(String needService) {
        this.needService = needService;
    }

    public int getCarAccId() {
        return carAccId;
    }

    public void setCarAccId(int carAccId) {
        this.carAccId = carAccId;
    }

    public long getOnTime() {
        return onTime;
    }

    public void setOnTime(long onTime) {
        this.onTime = onTime;
    }

    public long getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(long modifyTime) {
        this.modifyTime = modifyTime;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getRecommendValue() {
        return recommendValue;
    }

    public void setRecommendValue(int recommendValue) {
        this.recommendValue = recommendValue;
    }

    public int getUnitId() {
        return unitId;
    }

    public void setUnitId(int unitId) {
        this.unitId = unitId;
    }

    public double getGoodsSpecValuesPrice() {
        return goodsSpecValuesPrice;
    }

    public void setGoodsSpecValuesPrice(double goodsSpecValuesPrice) {
        this.goodsSpecValuesPrice = goodsSpecValuesPrice;
    }

    public String getBelongsType() {
        return belongsType;
    }

    public void setBelongsType(String belongsType) {
        this.belongsType = belongsType;
    }

    public String getBelongsTypeId() {
        return belongsTypeId;
    }

    public void setBelongsTypeId(String belongsTypeId) {
        this.belongsTypeId = belongsTypeId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getChName() {
        return chName;
    }

    public void setChName(String chName) {
        this.chName = chName;
    }

    public String getGoodsDetails() {
        return goodsDetails;
    }

    public void setGoodsDetails(String goodsDetails) {
        this.goodsDetails = goodsDetails;
    }

    public double getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(double costPrice) {
        this.costPrice = costPrice;
    }

    public int getFromGoodsId() {
        return fromGoodsId;
    }

    public void setFromGoodsId(int fromGoodsId) {
        this.fromGoodsId = fromGoodsId;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public int getStoreId() {
        return storeId;
    }

    public void setStoreId(int storeId) {
        this.storeId = storeId;
    }

    public String getSpecGroupKey() {
        return specGroupKey;
    }

    public void setSpecGroupKey(String specGroupKey) {
        this.specGroupKey = specGroupKey;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public double getServicePrice() {
        return servicePrice;
    }

    public void setServicePrice(double servicePrice) {
        this.servicePrice = servicePrice;
    }

    public int getPurchaseOrderId() {
        return purchaseOrderId;
    }

    public void setPurchaseOrderId(int purchaseOrderId) {
        this.purchaseOrderId = purchaseOrderId;
    }

    public String getGoodsCode() {
        return goodsCode;
    }

    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
    }

    public long getOffTime() {
        return offTime;
    }

    public void setOffTime(long offTime) {
        this.offTime = offTime;
    }

    public String getGoodsLogo() {
        return goodsLogo;
    }

    public void setGoodsLogo(String goodsLogo) {
        this.goodsLogo = goodsLogo;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public int getLogisticsTemplateId() {
        return logisticsTemplateId;
    }

    public void setLogisticsTemplateId(int logisticsTemplateId) {
        this.logisticsTemplateId = logisticsTemplateId;
    }

    public DeliveryWayEntity getDeliveryWay() {
        return deliveryWay;
    }

    public void setDeliveryWay(DeliveryWayEntity deliveryWay) {
        this.deliveryWay = deliveryWay;
    }

    public long getGoodsSpecValuesId() {
        return goodsSpecValuesId;
    }

    public void setGoodsSpecValuesId(long goodsSpecValuesId) {
        this.goodsSpecValuesId = goodsSpecValuesId;
    }

    public String getDeliveryWayName() {
        return deliveryWayName;
    }

    public void setDeliveryWayName(String deliveryWayName) {
        this.deliveryWayName = deliveryWayName;
    }

    public InstallStoreBean getStore() {
        return store;
    }

    public void setStore(InstallStoreBean store) {
        this.store = store;
    }


}
